package simple01;

import simple01.factory.FruitFactory;
import simple01.fruit.Fruit;

//简单工厂模式
public class Simple {
    public static void main(String[] args) {
        peterdo2();
    }

    public static void peterdo(){
        Fruit fruit = FruitFactory.getFruit(FruitFactory.ORANGE_TYPE);
        fruit.fruit();
        System.out.printf("----");
    }

    public static void peterdo2(){
        Fruit fruit = FruitFactory.getApple();
        fruit.fruit();
        System.out.printf("----");
    }

}
